home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / c++ / cplxops.z / cplxops
Encoding:
Text File  |  1998-10-30  |  8.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. CCCCPPPPLLLLXXXXOOOOPPPPSSSS((((3333CCCC++++++++))))                                                    CCCCPPPPLLLLXXXXOOOOPPPPSSSS((((3333CCCC++++++++))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      complex_operators -  operators for the C++ complex math library
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_...._hhhh_>>>>
  13.  
  14.      _cccc_llll_aaaa_ssss_ssss _cccc_oooo_mmmm_pppp_llll_eeee_xxxx _{{{{
  15.  
  16.      _pppp_uuuu_bbbb_llll_iiii_cccc_::::
  17.                _ffff_rrrr_iiii_eeee_nnnn_dddd _cccc_oooo_mmmm_pppp_llll_eeee_xxxx _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_++++_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_,,,, _cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  18.                _ffff_rrrr_iiii_eeee_nnnn_dddd _cccc_oooo_mmmm_pppp_llll_eeee_xxxx _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_----_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  19.                _ffff_rrrr_iiii_eeee_nnnn_dddd _cccc_oooo_mmmm_pppp_llll_eeee_xxxx _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_----_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_,,,, _cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  20.                _ffff_rrrr_iiii_eeee_nnnn_dddd _cccc_oooo_mmmm_pppp_llll_eeee_xxxx _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_****_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_,,,, _cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  21.                _ffff_rrrr_iiii_eeee_nnnn_dddd _cccc_oooo_mmmm_pppp_llll_eeee_xxxx _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_////_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_,,,, _cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  22.  
  23.                _ffff_rrrr_iiii_eeee_nnnn_dddd _iiii_nnnn_tttt     _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_====_====_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_,,,, _cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  24.                _ffff_rrrr_iiii_eeee_nnnn_dddd _iiii_nnnn_tttt     _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_!!!!_====_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_,,,, _cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  25.  
  26.                _vvvv_oooo_iiii_dddd           _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_++++_====_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  27.                _vvvv_oooo_iiii_dddd           _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_----_====_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  28.                _vvvv_oooo_iiii_dddd           _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_****_====_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  29.                _vvvv_oooo_iiii_dddd           _oooo_pppp_eeee_rrrr_aaaa_tttt_oooo_rrrr_////_====_((((_cccc_oooo_mmmm_pppp_llll_eeee_xxxx_))))_;;;;
  30.       _}}}}_;;;;
  31.  
  32. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  33.      The basic arithmetic operators, comparison operators, and assignment
  34.      operators are overloaded for complex numbers.  The operators have their
  35.      conventional precedences.  In the following descriptions for _cccc_oooo_mmmm_pppp_llll_eeee_xxxx
  36.      operators,
  37.       - _x, _y, and _z are of type _cccc_oooo_mmmm_pppp_llll_eeee_xxxx.
  38.  
  39.      Arithmetic operators:
  40.  
  41.      _z _==== _x _++++ _y      Returns a _cccc_oooo_mmmm_pppp_llll_eeee_xxxx which is the arithmetic sum of complex
  42.                     numbers _x and _y.
  43.  
  44.      _z _==== _----_x         Returns a _cccc_oooo_mmmm_pppp_llll_eeee_xxxx which is the arithmetic negation of
  45.                     complex number _x.
  46.  
  47.      _z _==== _x _---- _y      Returns a _cccc_oooo_mmmm_pppp_llll_eeee_xxxx which is the arithmetic difference of
  48.                     complex numbers _x and _y.
  49.  
  50.      _z _==== _x _**** _y      Returns a _cccc_oooo_mmmm_pppp_llll_eeee_xxxx which is the arithmetic product of
  51.                     complex numbers _x and _y.
  52.  
  53.      _z _==== _x _//// _y      Returns a _cccc_oooo_mmmm_pppp_llll_eeee_xxxx which is the arithmetic quotient of
  54.                     complex numbers _x and _y.
  55.  
  56.      Comparison operators:
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCPPPPLLLLXXXXOOOOPPPPSSSS((((3333CCCC++++++++))))                                                    CCCCPPPPLLLLXXXXOOOOPPPPSSSS((((3333CCCC++++++++))))
  71.  
  72.  
  73.  
  74.      _x _====_==== _y         Returns non-zero if complex number _x is equal to complex
  75.                     number _y; returns 0 otherwise.
  76.  
  77.      _x _!!!!_==== _y         Returns non-zero if complex number _x is not equal to
  78.                     complex number _y; returns 0 otherwise.
  79.  
  80.      Assignment operators:
  81.  
  82.      _x _++++_==== _y         Complex number _x is assigned the value of the arithmetic
  83.                     sum of itself and complex number _y.
  84.  
  85.      _x _----_==== _y         Complex number _x is assigned the value of the arithmetic
  86.                     difference of itself and complex number _y.
  87.  
  88.      _x _****_==== _y         Complex number _x is assigned the value of the arithmetic
  89.                     product of itself and complex number _y.
  90.  
  91.      _x _////_==== _y         Complex number _x is assigned the value of the arithmetic
  92.                     quotient of itself and complex number _y.
  93.  
  94. WWWWAAAARRRRNNNNIIIINNNNGGGG
  95.      The assignment operators do not produce a value that can be used in an
  96.      expression.  That is, the following construction is syntactically
  97.      invalid,
  98.  
  99.           _cccc_oooo_mmmm_pppp_llll_eeee_xxxx    _xxxx_,,,, _yyyy_,,,, _zzzz_;;;;
  100.           _xxxx _==== _(((( _yyyy _++++_==== _zzzz _))))_;;;;
  101.      whereas,
  102.  
  103.           _xxxx _==== _(((( _yyyy _++++ _zzzz _))))_;;;;
  104.  
  105.           _xxxx _==== _(((( _yyyy _====_==== _zzzz _))))_;;;;
  106.      are valid.
  107.  
  108. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  109.      _cccc_oooo_mmmm_pppp_llll_eeee_xxxx(3C++), _cccc_aaaa_rrrr_tttt_pppp_oooo_llll(3C++), _cccc_pppp_llll_xxxx_eeee_rrrr_rrrr(3C++), _cccc_pppp_llll_xxxx_eeee_xxxx_pppp(3C++), and
  110.      _cccc_pppp_llll_xxxx_tttt_rrrr_iiii_gggg(3C++).
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.